<!-- 
    递归组件
 -->
<template>
  <li>
    <div style="height:80px">
      <div class="recursion-page">
        <img :src="header">
        <span class="nickName">{{ nickName }}</span>
      </div>
      <div style="margin-left:40px">{{comment}}</div>
    </div>
    <ul class="replies" v-if="children?.length">
      <div v-for="(item, index) in children" :key="index">
        <RecursionComment
          v-bind="{ comment: item.comment,nickName: item.nickName,header: item.header, children: item.children }" />
      </div>
    </ul>
  </li>
</template>

<script lang="ts" setup>
defineProps(['nickName','comment','children','header'])
</script>

<style lang="less" scoped>
.recursion-page {
  display: flex;
  align-items: center;

  img {
    width: 40px;
    height: 40px;
    border-radius: 20px;
  }

  .nickName {
    margin-left: 10px;
  }
}
</style>
     